package com.project.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseEntity {

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT,value = "create_time")
    private LocalDateTime createTime=LocalDateTime.now();

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE ,value = "update_time")
    private LocalDateTime updateTime=LocalDateTime.now();

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT ,value = "create_by")
    private Integer createBy;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_by")
    private Integer updateBy;

    /**
     * 备注
     */
    @TableField(exist = false)
    private String remarks;




}